<!DOCTYPE html>
<html>
<head>

<base href="${BASE_PATH }">
<title>欢迎登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- //favicon.ico小图标名称 -->
<link rel="icon" href="${BASE_PATH }favicon.ico" />
<link rel="shortcut icon" href="${BASE_PATH }favicon.ico" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="欢迎登录">
<meta http-equiv="description" content="欢迎登录">
<!-- jquery -->
<script type="text/javascript"
	src="static/component/jquery/jquery-1.8.2.min.js"></script>

<link charset="utf-8" rel="stylesheet" href="static/login/login.css"
	media="all">

<script type="text/javascript" src="static/oauth2/oauth2.js"></script>
<script type="text/javascript" src="resources/js/encrypt/md5.js"></script>

<script type="text/javascript">
	function login() {
		var username = $('[name="username"]').val();
		if(username==''){
			alert('用户名不能为空！');
			return;
		}
		
		var pwd = $('[name="password"]').val();
		if(pwd==''){
			alert('密码不能为空！');
			return;
		}
		var imageCode = $('[name="imageCode"]').val();
		if(imageCode==''){
			alert('验证码不能为空！');
			return;
		}
		if(imageCode.length != 4){
			alert('验证码输入错误！');
			return;
		}
		
		$('[name="password"]').val(hex_md5(pwd));
		
		form1.action = "admin/login";
		form1.submit();
		// submit_js("login_login.action", "loginform");
	}
	
	function loadPicimageCode() {
		document.getElementById("picimageCode").src = '${BASE_PATH }front/image_code?ran=' + Math.random();
	}
	
	<!-- jQuery 当键盘敲击【ENTER】键时，系统登录 -->
	$(document).ready(function() {
		$("body").keydown(function(event) {
			if (event.which == 13) {
				login();
			}
		});
	});
</script>
<style type="text/css">
body {
	opacity: 1;
	background-image: url(static/login/bg/bg${ flyfox.bgNum (1)}.jpg);
	background-size: cover;
	background-repeat: no-repeat;
	width: 100%;
	height: 100%;
}
</style>
</head>
<body>

	<div class="login login-modern login-position">
		<form id="form1" action="" method="post" class="ui-form">
			<input type="hidden" name="pre_page" value="" />

			<fieldset>
				<h2 class="ui-form-title">用户登陆</h2>

				<div class="ui-form-item ui-form-item-focus">
					<label class="ui-label"> <span
						class="ui-icon ui-icon-userDEF">账户名：</span>
					</label> <input type="text" class="ui-input ui-input-normal"
						name="username" autofocus="autofocus" autocomplete="off"
						tabindex="1" value="" maxlength="100" placeholder="登录账号">
				</div>

				<div class="ui-form-item ui-form-item-focus" id="J-username">
					<label class="ui-label"> <span
						class="ui-icon ui-icon-securityON">登录密码：</span>
					</label> <input type="password" class="ui-input ui-input-normal"
						name="password" autocomplete="off" tabindex="2" value=""
						maxlength="100" placeholder="登录密码">
				</div>
				
				<div class="ui-form-item ui-form-item-focus" id="J-username">
					<label class="ui-label">
					<span class="ui-icon ui-icon-checkcodeT">验证码：</span>
					</label> 
					<input type="text" class="ui-input ui-input-normal" name="imageCode"  style="width: 90px;"
					autocomplete="off" tabindex="2" value="" maxlength="100" placeholder="验证码">
					<div class="input-group-addon" style="">
			     			<img id="picimageCode"  width="60" height="26"  
			     				 style="line-height: 50px;height: 40px;margin-left: 10px; cursor:pointer;"
				 			 src="${BASE_PATH }front/image_code" title="更换一张验证码图片" onclick="loadPicimageCode()"/>
			     	</div>
				</div>
			
				<div  class="ui-form-text" style="color: #FFCC00;font-weight:bold ;">
				提示：${msg!}
				</div>

				<div class="ui-form-item ui-form-item-30pd">
					<input type="button" onclick="login();" value="登 录"
						class="ui-button" tabindex="3">
					<p class="ui-form-other">
						<span class="login_text">其他帐号登录：</span> <a class="login_qq"
							href="javascript:void(0);" onclick='toLogin("qq")' title="qq登录"></a>
						<a class="login_baidu" href="javascript:void(0);"
							onclick='toLogin("baidu")' title="百度登录"></a>
						<!-- 
			<a class="login_sina" href="javascript:void(0);" onclick='toLogin("sina")' title="新浪登录"></a>
			 -->
					</p>
				</div>
			</fieldset>
		</form>
	</div>

</body>
</html>

